home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / General / Menu Events 1.1.2 / Menu Events Help / Menu Events Help.rsrc / STR#_1027.txt < prev    next >
Text File  |  1994-04-20  |  7KB  |  267 lines

  1. 
  2.  
  3. 
  4.  
  5. recorded.
  6.  
  7. selection, it does not cause a Select Menu Item script command to be
  8.  
  9. NOTE:  While receiving a Select Menu Item event does simulate a menu
  10.  
  11. 
  12.  
  13. recorded, but should work as usual.
  14.  
  15. selections, try again with the Caps Lock key up.  The command will not be
  16.  
  17. If an application seems to be misinterpreting or not receiving menu
  18.  
  19. 
  20.  
  21. release the Caps Lock key, to suppress the self-sending behavior.
  22.  
  23. duplication, you can use the item‚Äôs Command-key equivalent (if any), or
  24.  
  25. two commands when you select an item from its menus.  To prevent this
  26.  
  27. If the application is scriptable in its own right, a script editor may record
  28.  
  29. 
  30.  
  31. 
  32.  
  33. processed in the usual way.
  34.  
  35. has happened.  If it fails to send this event, the menu selection will be
  36.  
  37. event as a script command.  A gentle ‚Äútwang‚Äù sound confirms that this
  38.  
  39. modifier keys which were pressed), so that a script editor can record the
  40.  
  41. self-addressed Select Menu Item event (including parameters for any
  42.  
  43. Menu Events will try to nullify the menu selection and replace it with a
  44.  
  45. if the Caps Lock key is down at the time you release the mouse button.
  46.  
  47. where Menu Events is installed, menu item selection behavior is modified
  48.  
  49. When you are using a high-level-event-aware application on a machine
  50.  
  51. 
  52.  
  53. xSelf-Sending Behavior
  54.  
  55. 
  56.  
  57. 
  58.  
  59. 
  60.  
  61. to do program linking unless Menu Events is locked.
  62.  
  63. remote program linking.  In particular, guest users should not be allowed
  64.  
  65. should be careful about which users and applications are enabled for
  66.  
  67. IMPORTANT NOTE:  Users of machines where Menu Events is installed
  68.  
  69. 
  70.  
  71. Events at startup shows whether or not the lock is in effect.
  72.  
  73. remote sender to require user interaction.  The icon displayed by Menu
  74.  
  75. because most will assume the default interaction state, not expecting any
  76.  
  77. necessary for Menu Events to be useful with most target applications,
  78.  
  79. that events sent from a remote machine are not rejected.  This trick is
  80.  
  81. the default value, it will momentarily change it to kAEInteractWithAll, so
  82.  
  83. it sees that the user interaction state is kAEInteractWithLocal, which is
  84.  
  85. processes can be controlled by remote senders.  If it is not locked, and if
  86.  
  87. only target applications which explicitly allow interaction with all
  88.  
  89. If the Menu Events extension is locked, using Finder‚Äôs Get Info dialog, then
  90.  
  91. 
  92.  
  93. application).
  94.  
  95. Users & Groups (permission to user), and Finder‚Äôs Sharing (permission to
  96.  
  97. usual program linking checks apply, namely, Sharing Setup (on/off),
  98.  
  99. If the sending and receiving applications are on different machines, the
  100.  
  101. 
  102.  
  103. the event.
  104.  
  105. other process, the Menu event handler will respect that state, and refuse
  106.  
  107. kAEInteractWithSelf, where it disallows interaction requested by any
  108.  
  109. If the target application is in that rare user interaction state,
  110.  
  111. 
  112.  
  113. target application before sending it a Menu event.
  114.  
  115. time.  Another approach would be to call SetFrontProcess to activate the
  116.  
  117. Menu event, if there is any chance that it will be in the background at the
  118.  
  119. user interaction, it should call AEInteractWithUser before sending the
  120.  
  121. posted anyway.  Since your sending program is indirectly instigating a
  122.  
  123. the kAECanSwitchLayer flag has no effect, and the notification request is
  124.  
  125. If both the sending program and target application are in the background,
  126.  
  127. 
  128.  
  129. wait state, disrupting its usual background event processing behavior.
  130.  
  131. receives a Menu event with this flag not set, it may go into a notification
  132.  
  133. notification request.  If the target application is in the background, and
  134.  
  135. target application to come to the front without having to post a
  136.  
  137. interaction.  It should also set the kAECanSwitchLayer flag, allowing the
  138.  
  139. flag in the sendMode parameter to AESend, in order to achieve user
  140.  
  141. The sending program must set the kAECanInteract or kAEAlwaysInteract
  142.  
  143. 
  144.  
  145. 
  146.  
  147. when it sees a mouse-down event.
  148.  
  149. target application to the front, where an application always expects to be
  150.  
  151. if it did, it would still have to request user interaction just to bring the
  152.  
  153. know which menu selections will really require user interaction, but even
  154.  
  155. joint sender/receiver control over user interaction.  Menu Events doesn‚Äôt
  156.  
  157. The Apple Event Manager implements a complicated but sensible model for
  158.  
  159. 
  160.  
  161. xUser Interaction Policy
  162.  
  163. 
  164.  
  165. 
  166.  
  167. 
  168.  
  169. unknown Apple event, as it should.)
  170.  
  171. a problem if it returned errAEEventNotHandled when faced with an
  172.  
  173. classes, preventing Menu Events from working.  (The handler wouldn‚Äôt be
  174.  
  175. applications, for example, bind their own handler over all Apple event
  176.  
  177. rather than some handler supplied by the application.  Many Microsoft
  178.  
  179. includes a null ‚Äútattoo‚Äù parameter to prove that it handled the event,
  180.  
  181. NOTE:  When replying to any of the three event types, Menu Events
  182.  
  183. 
  184.  
  185. there, it is exactly as though the user had actually made the selection.
  186.  
  187. given item in response.  The patches then remove themselves.  From
  188.  
  189. asks which menu item was selected, and the patched traps provide the
  190.  
  191. the menu bar, with modifier keys if specified.  The application habitually
  192.  
  193. Fourth, if everything is OK, it posts an event to simulate a mouse click in
  194.  
  195. 
  196.  
  197. Menu event is still pending, it returns menuEventPendingErr.
  198.  
  199. If it finds that the patches are already in place, meaning that an earlier
  200.  
  201. Third, it patches some traps so that it can gain control of menu selection.
  202.  
  203. 
  204.  
  205. errAENoUserInteraction.
  206.  
  207. happens in normal operation.  If it is refused, it returns
  208.  
  209. menu selection while it is in the background, something which never
  210.  
  211. interaction, because it could be dangerous to feed the target application a
  212.  
  213. Second, it asks for the application to be brought to the front for user
  214.  
  215. 
  216.  
  217. fashion.
  218.  
  219. assumes that the count and enable/disable flags are set in the normal
  220.  
  221. counting or disabling items may differ from the norm.  Menu Events
  222.  
  223. the menu has a non-standard menu definition procedure, its way of
  224.  
  225. returns noSuchMenuErr, noSuchMenuItemErr, or menuItemDisabledErr.  If
  226.  
  227. First, it verifies that the given menu item is valid and enabled.  If not, it
  228.  
  229. 
  230.  
  231. event handling is more complex.
  232.  
  233. When you send a Select Menu Item event, the same things happen, but the
  234.  
  235. 
  236.  
  237. 
  238.  
  239. background or in the foreground, wherever it was before.
  240.  
  241. returns noSuchMenuErr.  Through all of this, the application stays in the
  242.  
  243. the case of a Query Menu event, if the given menu ID is not valid, it
  244.  
  245. reply to the query on the basis of the application‚Äôs menu list structure.  If
  246.  
  247. without looking at it.  The event handler provided by Menu Events forms a
  248.  
  249. application will dispatch the resulting high-level event as an Apple event
  250.  
  251. When you send a Query Menu List or Query Menu event, the ideal
  252.  
  253. 
  254.  
  255. 
  256.  
  257. √•How Does Menu Events Work?
  258.  
  259. ‹
  260.  
  261. ‹
  262.  
  263. 
  264.  
  265. 
  266.  
  267.